Control

Function

This API is used to set parameter for Storage > Disk page.

Request Message

Parameter Description

Table 1

ParameterRangeTypeDescription
TypestringNetHdd、RaidHdd、Hdd
InfoJson ObjectNetHdd Object, see Table 2 for detailed information
Hdd object, see Table 3 for detailed information

Table 2

NetHdd Object

ParameterRangeTypeDescription
ModestringAdd、Test、Del
Enableintenable
IndexintNetwork disk serial number (not required for Add, not required for Test)
TypeNFS
SMB/CIFS
stringProtocol(NFS SMB/CIFS)
Usernamestringusername
Passwordstringpassword
IpstringIP
Dirstringdirectory path
SizeIntHard disk capacity (GB)
idinHard drive serial number
disk_typeReadAndWriteDisk
RedundantDisk
ReadOnlyDisk
stringDisk group type
disk_group_idintDisk group serial number
base_enc_passwordJson ObjectPlease refer to the table in the Syntax file under the Request pubkey or randbyte in the Login directory for encryption password details

Table 3

Channel Object

ParameterRangeTypeDescription
idintHard drive serial number
disk_typeReadAndWriteDisk
RedundantDisk
ReadOnlyDisk
stringDisk group type
disk_group_idintDisk group serial number

Table 4

ParameterRangeTypeDescription
resultstringsuccess
failed

Sample:

POST /API/StorageConfig/Disk/Control HTTP/1.1
{
    "version": "1.0",
    "data": {
        "Info": {
            "Enable": 1,
            "Mode": "Edit",
            "disk_type": "ReadAndWriteDisk",
            "id": 1
        },
        "Type": "Hdd"
    }
}

Response Message

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
	"result": "success",
	"data": {}
}

Error Code

See Response Messages Body and Common error_code for more information.